import request from '@/router/axios';

export const saveToCreative = (data) =>{
  return request({
    url:'/api/beetles-offer/v2/creative/notfound/save-to-creative',
    method:'post',
    data:data
  })
}

export const getList = (current, size, params) =>{
  return request({
    url:'/api/beetles-offer/v2/creative/notfound/search',
    method:'get',
    timeout: 600 * 1000,
    params: {
      ...params,
      current,
      size
    }
  })
}

export const getDetailList = (current, size, params) =>{
  return request({
    url:'/api/beetles-offer/v2/creative/notfound/page',
    method:'get',
    timeout: 600 * 1000,
    params: {
      ...params,
      current,
      size
    }
  })
}

export const removeNotFound = (data) =>{
  return request({
    url:'/api/beetles-offer/v2/creative/notfound/remove',
    method:'post',
    data:data
  })
}

export const checkNotFound = (current, size, params) =>{
  return request({
    url:'/api/beetles-offer/v2/creative/notfound/search',
    method:'get',
    timeout: 600 * 1000,
    params: {
      ...params,
      current,
      size
    }
  })
}

export const getRelationCreative = (names,offerId,assetIds) =>{
  return request({
    url:"/api/beetles-offer/v2/creative/notfound/get-relation-creative",
    method:'get',
    params:{
      names:names,
      offerId:offerId,
      assetIds:assetIds
    }
  })
}
  export const relateCreative=(data, updatePlatform = true)=>{
  return request({
    url:'/api/beetles-offer/v2/creative/notfound/relate-creative',
    method:'post',
    data:data,
    params:{
      updatePlatform: updatePlatform,
    }
  })
}

